package com.longlong.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("registration_competition")
public class RegistrationCompetition {
    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * 赛程名称
     */
    private String competitionName;

    /**
     * 赛程描述
     */
    private String competitionDescribe;

    /**
     * 赛程开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime competitionStart;

    /**
     * 赛程结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime competitionFinish;


    /**
     * 通用字段
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
    @TableField(fill = FieldFill.DEFAULT)
    private LocalDateTime deleteTime;
    @TableLogic
    private Integer deleted;


    /**
     * 赛事信息
     */
    @TableField(exist = false)
    private List<RegistrationForm> registrationForms;


}
